﻿using System;
using System.Windows.Forms;

namespace ruscehproj2
{
    public partial class shp001 : Form
    {
        public bool On1;
        public bool On2;
        public bool isActive = false;
          public byte modeState = 1;
          public   bool pwr = false;
          public   bool is_open = false;
      
        public shp001()
        {
            InitializeComponent();
        }

        public bool getState()
        {
            return isActive;
        }

        private void mode_Click(object sender, EventArgs e)
        {
            modeState++;
            if (modeState > 3) modeState = 1;
            switch (modeState)
            {
                case 1: mode.BackgroundImage = Resources.set4; break;
                case 2: mode.BackgroundImage = Resources.set5; break;
                case 3: mode.BackgroundImage = Resources.set6; break;     
            }
        }

        private void shp001_Load(object sender, EventArgs e)
        {
            
            FormManager.hlp.hlpRefresh();
            is_open = true;
            if (FormManager.hlp.helpEnabled())   FormManager.hlp.Show();
         }

        private void shp001_FormClosing(object sender, FormClosingEventArgs e)
        {
            FormManager.hlp.Hide();
            is_open = false;
        }
        private void bigSwitch_Click(object sender, EventArgs e)
        {
            pwr = !pwr;
            if (pwr) bigSwitch.BackgroundImage = Resources.BigSwOn;
            else bigSwitch.BackgroundImage = Resources.BigSwOff;
        }

        private void shp001_Paint(object sender, PaintEventArgs e)
        {
            FormManager.hlp.hlpRefresh();
        }

        private void tfOn2_Click(object sender, EventArgs e)
        {
            On2 = true;
            FormManager.hlp.hlpRefresh();
        }

        private void tfOn1_Click(object sender, EventArgs e)
        {
            On1 = true; 
            FormManager.hlp.hlpRefresh();
        }
}
}
